The Slider Component > FSlider.setChangeHandler() |
FSlider.setChangeHandler()
Availability
Flash Player 6.
Usage
mySlider_sld.setChangeHandler (fnc[, scope])
Parameters
fnc String name of the function that will be called when the component has
changed.
scope The scope that the function should be called within. Optional; Default
is _parent.
Returns
Nothing
Description
Allows you to pass in a name of a function that will be called whenever the components value changes.
Example
The slider_simple_example.fla example file contains an example of using this method.
The following code sets the change handler to a function named "onChange".
function onChange()
{
var value = mySlider_sld.getIntValue();
trace("Value : " + value);
}
mySlider_sld.setChangeHandler("onChange");